<!DOCTYPE html>
<html>
<head th:include="common/header_css::header('霸王餐小程序后台管理-联盟信息表','%')"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div th:replace="common/toolbar::toolbar('联盟信息表管理')"></div>
        <div th:replace="common/search::search('%add')"></div>
    </div>
</div>

<!--添加League模态框-->
<div id="modal-add-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">联盟信息表添加</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="aform" method="post" class="form-horizontal" action="add" onsubmit="return checkAdd()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >名称                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="name"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="255"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >简称</label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="jianchen"
                                                                                                                                                                                        type="text" maxlength="50"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >缩略图</label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="thumb"
                                                                                                                                                                                        type="text" maxlength="200"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >纬度坐标                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="latitude"
                                                                                                                            required
                                                                                                                                                                                                type="number" />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >经度坐标                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="longitude"
                                                                                                                            required
                                                                                                                                                                                                type="number" />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >地址                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="address"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="255"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联盟特色                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="characteristic"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="500"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >省代码                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="provinceCode"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="10"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >省                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="province"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >市代码                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="cityCode"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="10"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >市                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="city"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >区代码                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="districtCode"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="10"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >区                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="district"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联系人                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="linkman"
                                                                                                                            required
                                                                                                                                                                                        type="text" maxlength="30"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联系电话                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="phone"
                                                                                                                            required
                                                                                                                                                                                        type="number" isPhone maxlength="11" />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联盟logo</label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="logo"
                                                                                                                                                                                        type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                                                                                                                </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="row">
                                                                                                                                        <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label class="col-sm-4 control-label">启用状态</label>
                                                        <div class="col-sm-8">
                                                            <input type="checkbox" class="js-switch" name="state" value="-1">
                                                        </div>
                                                    </div>
                                                </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label class="col-sm-4 control-label" >审核状态</label>
                                                        <div class="col-sm-8">
                                                            <select class="form-control" name="status">
                                                                                                                                    <option value="">请选择</option>
                                                                                                                                                                                                                                                                            <option value="1">待审核</option>
                                                                                                                                            <option value="2">审核通过</option>
                                                                                                                                            <option value="3">审核拒绝</option>
                                                                                                                                                                                                </select>
                                                        </div>
                                                    </div>
                                                </div>
                                                                                                                                        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >盟主微信号</label>
                                                    <div class="col-sm-8">
                                                            <input  class="form-control" name="wxno"
                                                                                                                                                                                        type="text" maxlength="50"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                <div class="col-md-12">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">联盟介绍                                                        *
                                                    </label>
                                                    <div class="col-sm-10">
                                                        <div id="sninfo"></div>
                                                        <input type="hidden" id="info" name="info"/>

                                                    </div>
                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <label class="col-sm-2 control-label">联盟背景图图片                                                            *
                                                        </label>
                                                        <div class="col-sm-10">
                                                            <input id="mfilepic" name="mfile" type="file" class="file"/>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white" href="#modal-add-form" >取消</button>
                                        </div>
                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <input id="hidpic" name="pic" type="hidden" value=""
                                                                                               required="required" />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--修改League模态框-->
<div id="modal-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">联盟信息表修改</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="mform" method="post" class="form-horizontal" action="modify" onsubmit="return checkModify()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >名称                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="name" name="name"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="255"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >简称</label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="jianchen" name="jianchen"
                                                                                                                                                                                       type="text" maxlength="50"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >缩略图</label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="thumb" name="thumb"
                                                                                                                                                                                       type="text" maxlength="200"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >纬度坐标                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="latitude" name="latitude"
                                                                                                                            required
                                                                                                                                                                                       type="number" />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >经度坐标                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="longitude" name="longitude"
                                                                                                                            required
                                                                                                                                                                                       type="number" />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >地址                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="address" name="address"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="255"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联盟特色                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="characteristic" name="characteristic"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="500"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >省代码                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="provinceCode" name="provinceCode"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="10"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >省                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="province" name="province"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >市代码                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="cityCode" name="cityCode"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="10"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >市                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="city" name="city"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >区代码                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="districtCode" name="districtCode"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="10"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >区                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="district" name="district"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联系人                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="linkman" name="linkman"
                                                                                                                            required
                                                                                                                                                                                       type="text" maxlength="30"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联系电话                                                        *
                                                    </label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="phone" name="phone"
                                                                                                                            required
                                                                                                                                                                                        type="number" isPhone maxlength="11" />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >联盟logo</label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="logo" name="logo"
                                                                                                                                                                                       type="text" maxlength="100"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="row">
                                                                                                                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label">启用状态</label>
                                                    <div class="col-sm-8">
                                                        <input type="checkbox" id="state" name="state" value="-1">
                                                    </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >审核状态</label>
                                                    <div class="col-sm-8">
                                                        <select class="form-control" name="status" id="status">
                                                                                                                            <option value="">请选择</option>
                                                                                                                                                                                                                                                            <option value="1">待审核</option>
                                                                                                                                    <option value="2">审核通过</option>
                                                                                                                                    <option value="3">审核拒绝</option>
                                                                                                                                                                                    </select>
                                                    </div>
                                                </div>
                                                </div>
                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="row">
                                                                                                                                    <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label" >盟主微信号</label>
                                                    <div class="col-sm-8">
                                                        <input  class="form-control" id="wxno" name="wxno"
                                                                                                                                                                                       type="text" maxlength="50"  />
                                                                                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                <div class="col-md-12">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">联盟介绍                                                        *
                                                    </label>
                                                    <div class="col-sm-10">
                                                        <div id="sninfo2"></div>
                                                        <input type="hidden" id="info2" name="info"
                                                                                                                       required />
                                                                                                            </div>
                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="row">
                                                <div class="col-md-12">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">联盟背景图图片                                                        *
                                                    </label>
                                                    <div class="col-sm-10">
                                                        <input id="mfilepic2" name="mfile" type="file" class="file" />
                                                    </div>
                                                </div>
                                                </div>
                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white" href="#modal-form" >取消</button>
                                        </div>
                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <input id="hidpic2" name="pic" type="hidden" value=""
                                                                                                   required="required" />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <input id="id" name="id" type="hidden" value="" />
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="common/footer_js::footer"></div>
                                                                                                                                                                                                                                <script>
    //图片上传
    function sendFile(file, editor, $editable) {

        var filename = false;
        try {
            filename = file['name'];
        } catch (e) {
            filename = false;
        }
        if (!filename) {
            $(".note-alarm").remove();
        }
        //以上防止在图片在编辑器内拖拽引发第二次上传导致的提示错误
        data = new FormData();
        data.append("mfile", file);
        data.append("key", filename); //唯一性参数

        $.ajax({
            data: data,
            type: "POST",
            url: "/upload/file?type=sn_League",
            cache: false,
            contentType: false,
            processData: false,
            success: function (e) {
                console.log(e)
                if (e&&e.code!=0) {
                    swal({title: "上传失败", text: "", type: "error"})
                    return;
                } else {
                    swal({title: "上传成功", text: "", type: "success"})
                }
                editor.insertImage($editable, e.data);
                setTimeout(function(){$(".note-alarm").remove();},5000);
            },
            error: function () {
                swal({title: "上传失败", text: "", type: "error"})
                return;
            }
        });
    }
    $(document).ready(function () {
        $(".summernote").summernote({
            lang: "zh-CN",
            width: 535,
            height: 260,
            dialogsInBody:true,
            onImageUpload: function (files, editor, $editable) {
                sendFile(files[0], editor, $editable);
            }
        })
    });
</script>
                                                                                                                                                                    <script src="/js/admin/league.js"></script>
</body>
</html>
